/*
 * Copyright (c) 2001, 2002 Boris Pruessmann and others.
 * All rights reserved.   This program and the accompanying materials
 * are made available under the terms of the Common Public License v0.5
 * which accompanies this distribution, and is available at
 * http://www.eclipse.org/legal/cpl-v05.html
 * 
 * Contributors:
 *    Boris Pruessmann - Initial implementation.
 */
package net.sourceforge.perforce.core;

import net.sourceforge.perforce.core.api.IPerforceServer;
import net.sourceforge.perforce.core.resources.IChangelist;
import net.sourceforge.perforce.core.syncinfo.IResourceStateDelta;

/** Listener interface that is used to notify about changes to a resource's state.
  * 
  * @version $Revision: 67 $
  * @author  <a href="mailto:bpruessmann@users.sourceforge.net">Boris Pruessmann</a>
  */
public interface IResourceStateChangeListener
{
	// ------------------------------------------------------------------------------------- Methods
	
	/** Called to indicate that the specified resources have changed.
	  * 
	  * @param resourceStateDelta delta containing old and new ResourceSyncInfo.
	  * @throws PerforceException in case of an unexpected error.
	  */
	void resourceStateChanged(IResourceStateDelta[] resourceStateDelta)
		throws PerforceException;
	
	/** Called to indicate that the given changelists have changed.
	  *
	  * @param changelists array of changelists that have changed. 
	  */
	void changelistStateChanged(IChangelist[] changelists);
	
	/** Called to indicate that the changelists of the given servers have changed.
	  *
	  * @param servers array of servers. 
	  */
	void changelistStateChanged(IPerforceServer[] servers);	
}
